<ion-view cache-view="false" hide-back-button="true" title="我的订单">
  <ion-nav-buttons side="left">
    <button class="button button-clear" ui-sref="dash.mine">
      <i class="icon ion-chevron-left"></i>
    </button>
  </ion-nav-buttons>

  <ul class="search-header row no-padding" style="position: fixed; top: 40px">
    <li class="col col-33">
      <button class="button button-clear" ng-click="changeShow(0)">
        <span ng-class="{'main-color': type == 0}">全部</span>
      </button>
    </li>
    <li class="col col-33">
      <button class="button button-clear icon-right" ng-click="changeShow(1)">
        <span ng-class="{'main-color': type == 1}">未完成</span>
      </button>
    </li>
    <li class="col col-33">
      <button class="button button-clear" ng-click="changeShow(2)">
        <span ng-class="{'main-color': type == 2}">已完成</span>
      </button>
    </li>
  </ul>
  <ion-content style="margin-top: 40px">
    <div class="list order-list" ng-repeat="order in orders" ng-show="statelist.indexOf(order.status) >= 0" style="font-size: 11px;">
      <div class="item" ng-click="toOrderDetail(order)">
        <span style="float: left">
          <img src="img/hd/ico_dd.png" style="width: 13px">
          订单号：{{order.order_serial_id}}
        </span>
        <span class="main-color" style="float: right">
          {{order.status | statusFilter}}
        </span>
      </div>
      <div class="item item-thumbnail-left" ng-repeat="product in order.order_products" style="background-color: #efefef">
        <img src="img/hd/pic_dd.png" ng-if="!product.smimgurl"/>
				<img ng-src="{{product.smimgurl}}" ng-if="product.smimgurl"/>
        <span style="float: left">
          <h3 style="margin-left: -30px">{{product.name}}</h3>
          <p style="margin-left: -30px">编号：{{product.barcode}}</p>
          <p style="margin-left: -30px; height: 20px">{{product.scale}}</p>
        </span>
        <span style="float: right;text-align: right">
          <p>￥{{product.realprice}}</p>
          <p>
            <i class="ion-close-round" style="font-size: 12px"></i>{{product.num}}
          </p>
        </span>
        <div style="clear: both"></div>
      </div>
      <div class="item">
        <span style="float: right;text-align: right">
          共计{{order.num}}件商品，合计：￥{{order.realprice - 0 + (order.sendprice - 0)}}
        </span>
      </div>
      <div class="item no-padding">
        <span style="float: right;text-align: right; padding:5px;" ng-if="order.status < '3'">
          <button class="button button-light main-btn" style="width: 60px" ng-click="addComment(order)" ng-if="order.status == '1'">评价</button>
          <button class="button button-light main-btn" ng-click="backOrder(order)" ng-if="order.status < '3'">退货</button>
        </span>
      </div>
    </div>
  </ion-content>
</ion-view>
